from django.conf.urls import url
from django.conf.urls.static import static
from django.conf import settings
from bugs import views

urlpatterns = [
                  url(r'^$', views.login, name='login'),
                  url(r'^login/$', views.login, name='login'),
                  url(r'^logout/$', views.logout, name='logout'),
                  url(r'^index/$', views.index, name='index'),

                  url(r'^newbug/$', views.new_bug, name='new_bug'),
                  url(r'^detail_bug/(?P<id>\d+)/$', views.detail_bug, name='detail_bug'),
                  url(r'^update_bug/$', views.update_bug, name='update_bug'),

                  url(r'^new_demand/$', views.new_demand, name='new_demand'),
                  url(r'^detail_demand/(?P<id>\d+)/$', views.detail_demand, name='detail_demand'),

                  url(r'^project/$', views.project, name='project'),

                  url(r'^add_user/$', views.add_user, name='add_user'),
                  url(r'^update_user/$', views.update_user, name='update_user'),
                  url(r'^search_user/$', views.search_user, name='search_user'),
                  url(r'^delete_user/$', views.delete_user, name='delete_user'),
                  url(r'^delete_form/$', views.delete_form, name='delete_form'),
                  url(r'^delete_form_confirm/$', views.delete_form_confirm, name='delete_form_confirm'),
                  url(r'^download/(?P<id>\d+)/$', views.download_file, name='download'),
              ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
